package biz.obake.team.touchprotector.f;

import android.os.Build;
import android.os.Handler;
import android.view.MotionEvent;
import biz.obake.team.touchprotector.f.l;
import biz.obake.team.touchprotector.g.c;
import java.util.Map;

public final class i implements l, c.b {
    public static final a e = new a((a) null);
    /* access modifiers changed from: private */

    /* renamed from: b  reason: collision with root package name */
    public final Handler f1626b = new Handler();

    /* renamed from: c  reason: collision with root package name */
    private final b f1627c = new b(this);
    /* access modifiers changed from: private */

    /* renamed from: d  reason: collision with root package name */
    public final k f1628d;

    public static final class a {
        private a() {
        }

        public /* synthetic */ a(a aVar) {
            this();
        }

        public final void a(Map<String, String> map) {
            d.h.b.c.c(map, "d");
            map.put("NotificationDrawerCloser.Trigger", "");
        }
    }

    public static final class b implements Runnable {

        /* renamed from: b  reason: collision with root package name */
        final /* synthetic */ i f1629b;

        b(i iVar) {
            this.f1629b = iVar;
        }

        public void run() {
            if (Build.VERSION.SDK_INT >= 26 && !this.f1629b.f1628d.hasWindowFocus() && biz.obake.team.touchprotector.d.i.b.c()) {
                biz.obake.team.touchprotector.c.f();
                this.f1629b.f1626b.removeCallbacksAndMessages((Object) null);
                this.f1629b.f1626b.post(this);
            }
        }
    }

    public i(k kVar) {
        d.h.b.c.c(kVar, "mPV");
        this.f1628d = kVar;
    }

    public static final void g(Map<String, String> map) {
        e.a(map);
    }

    public void a() {
        l.a.c(this);
        c.h(this);
        this.f1626b.removeCallbacksAndMessages((Object) null);
    }

    public boolean b(MotionEvent motionEvent) {
        d.h.b.c.c(motionEvent, "event");
        return l.a.a(this, motionEvent);
    }

    public void c() {
        l.a.d(this);
    }

    public void d() {
        l.a.b(this);
        c.e(this);
    }

    public void onRamPrefsChanged(String str) {
        if (d.h.b.c.a("NotificationDrawerCloser.Trigger", str)) {
            this.f1626b.removeCallbacksAndMessages((Object) null);
            this.f1626b.postDelayed(this.f1627c, biz.obake.team.touchprotector.g.a.g("show_notification_drawer") ? 2500 : 0);
        }
    }
}
